package com.ruoyi.houses.service.impl.xxljob;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @author 小薛超人
 * @version 1.0
 * @description: TODO
 * @date 2025/9/18 20:55
 */
@Service
public class HouseJob {

    @Autowired
    private StringRedisTemplate redisTemplate;

    @XxlJob("jobHandler1")
    public void jobHandler1() throws Exception {
        XxlJobHelper.log("开始执行jobHandler1");

        String jobParam = XxlJobHelper.getJobParam();


        String navTop = redisTemplate.opsForValue().get("navTop");

        XxlJobHelper.log(navTop);


        // for (int i = 0; i < 5; i++) {
        //     XxlJobHelper.log("beat at:" + i);
        //     TimeUnit.SECONDS.sleep(2);
        // }
    }
}
